﻿Imports CalificadorPremiosOscarUtilidades.formularios

Public Class FormulariosFactory

    Public Shared Function crearAcercaDe() As Form
        Return New AboutBox()
    End Function

    Public Shared Function obtenerNombreApp() As String
        If My.Application.Info.Title <> "" Then
            Return My.Application.Info.Title
        Else
            Return System.IO.Path.GetFileNameWithoutExtension(My.Application.Info.AssemblyName)
        End If
    End Function

    Public Shared Function crearLogin(ByRef padre As Form, ByVal modoLogin As Boolean) As Form
        Dim login As New LoginForm()
        login.MdiParent = padre
        login.AdmonMode = modoLogin
        FormUtilerias.centrarFormularioHijo(padre, login)
        Return login
    End Function

    Public Shared Function crearTipoInicioSesion(ByRef padre As Form) As Form
        Dim tipoSesion As New TipoInicioSesion()
        tipoSesion.MdiParent = padre
        FormUtilerias.centrarFormularioHijo(padre, tipoSesion)
        Return tipoSesion
    End Function

    Public Shared Function crearAdministracionCategoria(ByRef padre As Form) As CategoriaForm
        Dim f As New CategoriaForm()
        f.MdiParent = padre
        'FormUtilerias.centrarFormularioHijo(padre, f)
        f.StartPosition = FormStartPosition.WindowsDefaultLocation
        Return f
    End Function

    Public Shared Function crearAdministracionCeremonia(ByRef padre As Form) As CeremoniaForm
        Dim f As New CeremoniaForm()
        f.MdiParent = padre
        FormUtilerias.centrarFormularioHijo(padre, f)
        Return f
    End Function

    Public Shared Function crearAdministracionNominados(ByRef padre As Form) As NominadosForm
        Dim f As New NominadosForm()
        f.MdiParent = padre
        'FormUtilerias.centrarFormularioHijo(padre, f)
        f.StartPosition = FormStartPosition.WindowsDefaultLocation
        Return f
    End Function

    Public Shared Function crearAdministracionPaises(ByRef padre As Form) As PaisesForm
        Dim f As New PaisesForm()
        f.MdiParent = padre
        'FormUtilerias.centrarFormularioHijo(padre, f)
        f.StartPosition = FormStartPosition.WindowsDefaultLocation
        Return f
    End Function

    Public Shared Function crearAdministracionVotantes(ByRef padre As Form) As VotantesForm
        Dim f As New VotantesForm()
        f.MdiParent = padre
        'FormUtilerias.centrarFormularioHijo(padre, f)
        f.StartPosition = FormStartPosition.WindowsDefaultLocation
        Return f
    End Function

End Class
